define([
  'backbone'
], function(Backbone, User){
  var urlBase = "http://",
      hostname = window.location.hostname,
      port = window.location.port;

  console.log("Hostname: " + hostname);
  console.log("Port: " + port);

  urlBase += hostname;
  if(port != 80) {
    urlBase += (":" + port);
  }
  
  var conf = {
    routes: {
      subscribers: {
        "list": urlBase + "/api/subscribers"
      },

      internals: {
        "list": urlBase + "/api/users",
        "familiars": "/familiars"
      },

      familiars: {
        list: urlBase + "/api/users"
      },

      residences: {
        "detail": urlBase + "/api/residence"
      },

      notifications: {
        "list": urlBase + "/notifications"
      },

      users: {
        "profile": urlBase + "/api/me/profile",
        "familiars": urlBase + "/api/me/familiars",
        "internals": urlBase + "/api/me/internals",
        "photos": urlBase + "/api/me/photos",
        "notifications": urlBase + "/api/me/notifications",
        "internet": urlBase + "/api/me/internet/search"
      },

      messages: {
        share: "/api/me/outbox",
        inbox: "/api/me/inbox",
        outbox: "/api/me/outbox"
      }
    },
    logger: "debug"
  };
  
  /*  console.log("--- APIs from ---");
      console.log(conf.routes.subscribers.list);
      console.log(conf.routes.internals.list);
      console.log("-----------------"); */
  return conf;
});